import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    //路径别名的配置
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
  server:{
    proxy:{
      "/path":{
        target:"https://api.github.com/",
        changeOrigin:true,
        rewrite:path=>path.replace(/^\/path/,""),
      }
    }
  }
})
